<?php /* Smarty version Smarty-3.1.13, created on 2013-12-26 17:37:53
         compiled from "G:\phpserver\ibo123\templates\admin\posts\write.tpl" */ ?>
<?php /*%%SmartyHeaderCode:225595283978166f345-21951111%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '42c5dce5aa8b035c98a565b7f807728082c66572' => 
    array (
      0 => 'G:\\phpserver\\ibo123\\templates\\admin\\posts\\write.tpl',
      1 => 1388050558,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '225595283978166f345-21951111',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_5283978180ca99_00510198',
  'variables' => 
  array (
    'admin_action_alert' => 0,
    'admin_quick_note' => 0,
    'post' => 0,
    'hotcate' => 0,
    'cate' => 0,
    'tags' => 0,
    'tag' => 0,
    'hottags' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5283978180ca99_00510198')) {function content_5283978180ca99_00510198($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("admin/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("admin/navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("admin/sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<link href="<?php echo @constant('WEBSITE_URL');?>
public/assets/pagedown/demo.css" rel="stylesheet"> 
<script type="text/javascript" src="<?php echo @constant('WEBSITE_URL');?>
public/assets/pagedown/Markdown.Converter.js"></script>
<script type="text/javascript" src="<?php echo @constant('WEBSITE_URL');?>
public/assets/pagedown/Markdown.Sanitizer.js"></script> 
<script type="text/javascript" src="<?php echo @constant('WEBSITE_URL');?>
public/assets/pagedown/Markdown.Editor.js"></script> 
<script type="text/javascript"	src="<?php echo @constant('WEBSITE_URL');?>
public/assets/lib/ajaxupload.js"></script>
<script type="text/javascript"	src="<?php echo @constant('WEBSITE_URL');?>
/public/assets/js/admin/postCategory/tree.js"></script>
     
<div class="content">
        
        <div class="header">
            <div class="stats">
			<p class="stat"><!--span class="number"></span--></p>
			</div> 
            <h1 class="page-title">发表文章 </h1>
        </div>
 
<div class="container-fluid">
	<div class="row-fluid">
		<div class="bb-alert alert alert-info" style="display: none;">
			<span>操作成功</span>
		</div>
 
<?php echo $_smarty_tpl->tpl_vars['admin_action_alert']->value;?>

<?php echo $_smarty_tpl->tpl_vars['admin_quick_note']->value;?>

    
 <div id="myTabContent" class="tab-content"> 
<!-- 实际写文章内容的布局开始 -->	 
<div class="row-fluid">
  <div class="alert alert-success span9" id="p_tip">
	  <button type="button" class="close" data-dismiss="alert">&times;</button>
	  <p><strong>提示!</strong>程序将自动保存草稿</p>
  </div>
 <div class="container-fluid"> 
    <div class="span9"> 
            <div class="p">
                <label for="title" class="hid">标题</label>
                <input type="text" id="p_title" name="title" tabindex="1" value="<?php echo $_smarty_tpl->tpl_vars['post']->value->post_title;?>
" class="text-34 input-xxlarge" style="height:35px" autocomplete="off" spellcheck="false" placeholder="文章标题" />
                <input type="hidden" id="p_id" value="<?php echo $_smarty_tpl->tpl_vars['post']->value->ID;?>
"/>
                <input type="hidden" id="p_status" value="<?php echo $_smarty_tpl->tpl_vars['post']->value->post_status;?>
"/>
            </div> 
            <div id="wmd-button-bar"></div>
            <div class="p">
                     <textarea id="wmd-input" class="textarea-14" name="text" tabindex="2" autocomplete="off" spellcheck="false" rows="15"><?php echo $_smarty_tpl->tpl_vars['post']->value->post_markdowncontent;?>
</textarea>
                    <span class="resize"></span>
            </div>
        <div id="wmd-preview" class="fmt preview"></div>
    </div>
    <div class="span3 well ">
        <div class="p">
           <h3><i class="icon-th-list"></i>设置类型</h3>
           <ul class="nav nav-tabs">
			  <li class="active">
			    <a href="#oftenusecategory"  data-toggle="tab">常用分类</a>
			  </li>
			  <li><a href="#categorytree"  data-toggle="tab">分类列表</a></li> 
		  </ul>
		  <div class="tab-content">
			  <div class="tab-pane active" id="oftenusecategory">
                  <?php  $_smarty_tpl->tpl_vars['cate'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cate']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['hotcate']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['cate']->key => $_smarty_tpl->tpl_vars['cate']->value){
$_smarty_tpl->tpl_vars['cate']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['cate']->key;
?>
                  <label class="radio">
                      <input type="radio" name="category_usually" value="<?php echo $_smarty_tpl->tpl_vars['cate']->value->id;?>
"> <?php echo $_smarty_tpl->tpl_vars['cate']->value->name;?>

                   </label>
                  <?php } ?>
			  </div> 
			   <div class="tab-pane" id="categorytree">
				<ul id="tree" class="ztree" style="width: 150px; overflow: auto;"></ul>
			  </div> 
		  </div>
       </div>   
       <div class="p">
           <h3><i class="icon-tag"></i>设置标签</h3>
           <div id="u_tags">
               <?php  $_smarty_tpl->tpl_vars['tag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['tag']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['tags']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['tag']->key => $_smarty_tpl->tpl_vars['tag']->value){
$_smarty_tpl->tpl_vars['tag']->_loop = true;
?>
               <span class="label label-info hand u_tag" data="<?php echo $_smarty_tpl->tpl_vars['tag']->value->id;?>
"><?php echo $_smarty_tpl->tpl_vars['tag']->value->name;?>
</span>
               <?php } ?>
			</div>
		  
 		  <div class="input-append p">
			  <input class="span8" id="addtaginput" type="text">
			  <button class="btn" type="button" id="addtagbtn">添加</button>
 		 </div>
 		  <h6> 点击选择常用标签</h6>
 		 <div class="well">
             <?php  $_smarty_tpl->tpl_vars['tag'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['tag']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['hottags']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['tag']->key => $_smarty_tpl->tpl_vars['tag']->value){
$_smarty_tpl->tpl_vars['tag']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['tag']->key;
?>
             <span class="label label-info hand a_tag" data="<?php echo $_smarty_tpl->tpl_vars['tag']->value->id;?>
"><?php echo $_smarty_tpl->tpl_vars['tag']->value->name;?>
</span>
             <?php } ?>

 		 </div>
       </div>   
       
        
       <button class="btn btn-large btn-primary" type="button" id="p_publish">发布</button>
	   <button class="btn btn-large btn-link" type="button" id="p_autosave">保存草稿</button> 
    </div>  
<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true" id="closeimg2">×</button>
    <h3 id="myModalLabel">上传图片</h3>
  </div>
  <div class="modal-body">
	 <ul class="nav nav-tabs" id="fileuptab">
	  <li class="active"><a href="#userupdiv" data-toggle="tab">本地上传</a></li>
	  <li><a href="#hrefimg" data-toggle="tab">网络图片</a></li>
	  
	</ul>
	 
	<div class="tab-content">
	  <div class="tab-pane active" id="userupdiv">       
	  <button class="btn" id="selectfile">选择文件</button>
	   <input type="hidden" id="s_filename" value='' />
	   <label id="lablefilename"></label>
       <button id="fileupload" class="btn btn-primary" >上传</button>
     </div>
	  <div class="tab-pane" id="hrefimg"><p><input type="text" id="imgfile_src" value="<?php echo $_smarty_tpl->tpl_vars['post']->value->post_file_location;?>
"/>
       <button id="fileupload_href" class="btn btn-primary">上传</button></div>
	  
	</div>
</p>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true" id="closeimg">关闭</button> 
  </div>
</div>
<!-- Modal end -->

  </div>
</div>
     <script language="JavaScript">
         var weburl = '<?php echo @constant('WEBSITE_URL');?>
';
         var parms = 1;
         parms = {'category_id':'<?php echo $_smarty_tpl->tpl_vars['post']->value->post_category;?>
'};
     </script>
 <script src="<?php echo @constant('WEBSITE_URL');?>
public/assets/layer/layer.min.js"></script>
<script src="<?php echo @constant('WEBSITE_URL');?>
public/js/posts/write.js"></script>

<!-- 实际写文章内容的布局结束-->	       
    </div>
    </div>
 <!-- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
<?php echo $_smarty_tpl->getSubTemplate ("admin/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }} ?>